<template>
  <div class="box">
    <table border="1">
      <thead>
        <tr>
          <td>id</td>
          <td>商品名称</td>
          <td>价格</td>
          <td>标签</td>
          <td>操作</td>
        </tr>
      </thead>
      <tbody>
        <tr v-for="(item ,index) in tableList" :key="item.id">
          <slot name="body" :row="item" :index="index"></slot>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
export default {
  name: 'MyTable',
  props: {
    tableList: {}
  },
  methods: {
    removeGoods(id) {
      this.$emit('deleteGoods', id)
    }
  }
}
</script>

<style scoped>
  .box {

  }
</style>